<script src="js/proinfo/purchase/acceptanceConfirmation2.js"></script>
<!-- 打印组件 -->
<script type="text/javascript" src="assets/print/jquery.jqprint-0.3.js"></script>

<!-- 导出word组件 -->
<script type="text/javascript" src="assets/html2word/FileSaver.js"></script>
<script type="text/javascript" src="assets/html2word/jquery.wordexport.js"></script>
<!--main content start-->
<section id="main-content">
    <section class="wrapper">
        <!--state overview end-->
        <div class="row">
            <div class="col-lg-12">
                <section class="panel">
                    <header class="panel-heading">
                        添加供应商
                    </header>
                    <div class="panel-body">
                        <div class="bio-row">
                            <p>
                                <span>项目名称</span>{{headerMap.proName}}</p>
                        </div>
                        <div class="bio-row">
                            <p><span>申请人</span>{{headerMap.applyManname}}</p>
                        </div>
                        <div class="bio-row">
                            <p>
                                <span>申请时间</span>{{headerMap.applyTime}}</p>
                        </div>
                        <div class="bio-row">
                            <p>
                                <span>申请用途</span>{{headerMap.useFul}}</p>
                        </div>
                        <div class="bio-row line-row">
                            <p>申请说明</p>
                            <p>{{headerMap.descriptor}}</p>
                        </div>
                    </div>
                </section>
                <section class="panel">
                    <header class="panel-heading add-heading">
                        采购清单
                        <i class="add-icon icon-eye-open" onclick="showAllQuote();"> 全部报价</i>
                    </header>
                    <div class="panel-body">
                        <div id="priceContainer" class="dlshouwen-grid-container"></div>
                    </div>
                </section>
                <section class="panel">
                    <header class="panel-heading">
                        供应商列表
                    </header>
                    <div class="panel-body">
                        <div id="pryslContainer" class="dlshouwen-grid-container"></div>
                    </div>
                </section>

                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <section class="panel">
                                <div class="panel-heading add-heading">
                                    验收信息
                                    <i class="add-icon icon-remove" data-dismiss="modal" aria-hidden="true"></i>
                                </div>
                                <div class="panel-body">
                                    <div class="form-group customerForm" ng-disabled="true">
                                        <label class="col-sm-2 control-label">实收数量</label>
                                        <div class="col-sm-10">
                                            <input type="text" onkeyup="clearNoNum(this)"  onblur="clearNoNum(this)" certus-required-polyfill string-to-number ng-model="acceptance.recievedNum" class="form-control">
                                        </div>
                                    </div>
                                    <div class="form-group customerForm" ng-disabled="true">
                                        <label class="col-sm-2 control-label">单位</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" certus-required-polyfill ng-model="acceptance.unit" placeholder="请填写计数单位,例如:个、台等……">
                                        </div>
                                    </div>
                                    <div class="form-group customerForm" ng-hide="true">
                                        <label class="col-sm-2 control-label">采购单位</label>
                                        <div class="col-sm-10">
                                            <select class="form-control" certus-required-polyfill ng-model="acceptance.acceptanceResolve" >
                                                <option ng-repeat="x in select.acceptanceResolveSelect" value = "{{x.code}}">
                                                    {{x.name}}
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group customerForm" >
                                        <label class="col-sm-2 control-label">验收单位</label>
                                        <div class="col-sm-10">
                                            <select class="form-control" certus-required-polyfill ng-model="acceptance.itAcceptance" >
                                                <option ng-repeat="x in select.itAcceptanceSelect " value="{{x.code}}">
                                                    {{x.name}}
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                    <p class="default-buttons">
                                        <a href="javascript:void(0);" class="button-back btn btn-info" data-dismiss="modal" aria-hidden="true">取消</a>
                                        <a href="javascript:void(0);" class="button-next  btn btn-info btn-l10" ng-click="admitAcceptance(sbsb.bqCode,sbsb.biCode)">确认</a>
                                    </p>
                                </div>
                                <div class="panel-bg"></div>
                            </section>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                </div>

                <section class="panel">
                    <header class="panel-heading">
                        留言
                    </header>
                    <div class="panel-body">
                        <div class="form-group customerForm">
                           
                                <textarea class="form-control"  maxlength="120"  certus-required ng-model="submmitData.purchaseStepEntity.opinionMsg"></textarea>
                           
                        </div>
                        
                    </div>
                </section>
                <section class="panel">
                    <div class="panel-body">
                            <p class="default-buttons">
                                    <a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
                                    <!-- <a href="javascript:void(0);" class="button-back btn btn-warning btn-l10">退回</a> -->
                                    <a href="javascript:void(0);" class="button-next  btn btn-info btn-l10"  ng-click="approvalAgreementSubmit()">提交</a>
                                    <a href="javascript:void(0);" class="button-next btn btn-success" onclick="pryslGridCheckedRecordsLength();">打印单据</a>
                                    <!-- <a href="javascript:void(0);" class="button-next btn btn-danger ">不通过</a> -->
                                </p>
                    </div>
                </section>
            </div>
        </div>
    </section>
</section>

<div style="width:80%;position:relative;top: 0;left: 15%;">
<section id="main-content-1" >
    <section class="wrapper">
        <!--state overview end-->
        <div class="row">
            <div class="col-lg-12">
                <section class="panel" id="printbox">
                    <header class="panel-heading add-heading">
                        采购订单{{submmitData.purchaseStepEntity.buyingRequisitionCode}}
                        <i class="add-icon">编号：Q/STS-BD-XZ-2012-004</i>
                    </header>
                    <div class="panel-body">
                        <div class="bio-row line-row">
                            <table class="table table-bordered" style="text-align: center">
                                <tbody>
                                <tr>
                                    <td colspan="2">供应商</td>
                                    <td colspan="3">
                                        {{first.supplierName}}
                                    </td>
                                    <td colspan="2">
                                        订单/合同编号
                                    </td>
                                    <td colspan="3">
                                        {{first.no}}
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">验收地点</td>
                                    <td colspan="3">
                                        {{first.address}}
                                    </td>
                                    <td colspan="2">
                                        验收日期
                                    </td>
                                    <td colspan="3">
                                        {{first.date}}
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="10" style="text-align: left;">
                                        验收内容：(可附表，但验收人员必须在附表签字)
                                    </td>
                                </tr>
                                <tr>
                                    <td rowspan="2" width="54px">
                                        序号
                                    </td>
                                    <td rowspan="2" width="100px">
                                        设备名称
                                    </td>
                                    <td rowspan="2" width="200px">
                                        规格(参数)
                                    </td>
                                    <td rowspan="2" width="54px">
                                        单位
                                    </td>
                                    <td rowspan="2" width="55px">
                                        实收数量
                                    </td>
                                    <td colspan="2" width="130px">
                                        采购单位
                                    </td>
                                    <td colspan="2" width="130px">
                                        验收单位
                                    </td>
                                    <td rowspan="2" min-width="100px">
                                        备注
                                        <span style="font-size: 12px;">(固定资产编号)</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="55px">
                                        是否合格
                                    </td>
                                    <td width="75px">
                                        验收人
                                    </td>
                                    <td width="55px">
                                        是否合格
                                    </td>
                                    <td width="75px">
                                        验收人
                                    </td>
                                </tr>
                                <tr ng-repeat="x in second" >
                                    <td>
                                        {{$index}}
                                    </td>
                                    <td>
                                       {{x.name}}
                                    </td>
                                    <td>
                                       {{x.specification}}
                                    </td>
                                    <td>
                                        {{x.unit}}
                                    </td>
                                    <td>
                                        {{x.recievedNum}}
                                    </td>
                                    <td>
                                        {{x.acceptanceResolve}}
                                    </td>
                                    <td>
                                        {{x.acceptanceUserName}}
                                    </td>
                                    <td>
                                        {{x.itAcceptance}}
                                    </td>
                                    <td>
                                        {{x.itAcceptanceUserName}}
                                    </td>
                                    <td>

                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        验收意见*
                                    </td>
                                    <td colspan="9" style="text-align: left;">
                                        <p>以上设备经过安装调试完成，先按照订单/合同的要求进行验收,意见如下:</p>
                                        <ul>
                                            <li>
                                                1*、设备的品牌、外观、规格数量、配件是否正确？{{first.one}}
                                            </li>
                                            <li>
                                                2*、经安装调试后的设备运行是否正常？{{first.two}}
                                            </li>
                                            <li>
                                                3*、技术资料是否齐全？{{first.three}}
                                            </li>
                                            <li>
                                                4*、验收是否合格? {{first.four}}
                                            </li>
                                        </ul>
                                        资产管理员(签名):
                                    </td>
                                </tr>
                                <tr>
                                    <td>备注</td>
                                    <td colspan="9">
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </section>
                <section class="panel">
                    <div class="panel-body">
                        <p class="default-buttons">
                            <a href="javascript:void(0);" onclick="closePrintView()"  class="button-back btn btn-danger">关闭</a>
                            <a href="javascript:void(0);" class="button-next  btn btn-info btn-l10" id="word">导出word</a>
                            <a href="javascript:void(0);" class="button-next  btn btn-info btn-l10" id="print">打印单据</a>
                        </p>
                    </div>
                </section>
            </div>
        </div>
    </section>
</section>
</div>

<!-- Sodal -->
<div class="modal fade" id="mySodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <section class="panel">
                <div class="panel-heading add-heading">
                    设备验收单
                    <i class="add-icon icon-remove" data-dismiss="modal" aria-hidden="true"></i>
                </div>
                <div class="panel-body">
                    <div class="form-group customerForm">
                        <label class="col-sm-2 control-label">订单/合同</label>
                        <div class="col-sm-10">
                            <input type="text" certus-required-polyfill class="form-control" ng-model = "first.no">
                        </div>
                    </div>
                    <div class="form-group customerForm">
                        <label class="col-sm-2 control-label">验收地点</label>
                        <div class="col-sm-10">
                            <input type="text" certus-required-polyfill class="form-control" ng-model = "first.address">
                        </div>
                    </div>
                    <div class="form-group customerForm">
                        <label class="col-sm-2 control-label">验收日期</label>
                        <div class="col-sm-10">
                            <input type="text" certus-required-polyfill class="form-control" ng-model = "first.date">
                        </div>
                    </div>
                    <div class="form-group customerForm">
                        <label class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-10">
                            <textarea certus-required-polyfill class="form-control"  maxlength="120"  ng-model = "first.remark"></textarea>
                        </div>
                    </div>
                    <div class="form-group customerForm">
                        <label class="col-sm-2 control-label">验收意见*</label>
                        <div class="col-sm-10">
                            <ul class="yslist">
                                <li>
                                    1*、设备的品牌、外观、规格数量、配件是否正确?
                                    <select  certus-required-polyfill  ng-model="first.one" >
                                        <option ng-repeat="x in select.yesorNo " value="{{x.name}}">
                                            {{x.name}}
                                        </option>
                                    </select>
                                </li>
                                <li>
                                    2*、经安装调试后的设备运行是否正常？
                                    <select  certus-required-polyfill ng-model="first.two" >
                                        <option ng-repeat="x in select.yesorNo " value="{{x.name}}">
                                            {{x.name}}
                                        </option>
                                    </select>
                                </li>
                                <li>
                                    3*、技术资料是否齐全？
                                    <select  certus-required-polyfill ng-model="first.three" >
                                        <option ng-repeat="x in select.yesorNo " value="{{x.name}}">
                                            {{x.name}}
                                        </option>
                                    </select>
                                </li>
                                <li>
                                    4*、验收是否合格？
                                    <select  certus-required-polyfill ng-model="first.four" >
                                        <option ng-repeat="x in select.yesorNo " value="{{x.name}}">
                                            {{x.name}}
                                        </option>
                                    </select>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <p class="default-buttons">
                        <a href="javascript:void(0);" class="button-back btn btn-info" data-dismiss="modal" aria-hidden="true">取消</a>
                        <a href="javascript:void(0);" class="button-next  btn btn-info btn-l10"  onclick="openPrintView()">
                            <i class="icon-share"></i> 设备验收单</a>
                    </p>
                </div>
                <div class="panel-bg"></div>
            </section>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<script>
    $(function () {
        //打印初始化
        $("#print").click(function () {
            $("#printbox").jqprint();
        })
        //导出word
        $("#word").click(function () {
            $("#printbox").wordExport();
        })
    })
</script>